﻿@{
  ViewBag.Title = "立项列表";
  Layout = "~/Views/Shared/_Layout.cshtml";
}
@section mystyle{

}
<!-- search -->
<div class="content margin-top-20">
  <div class="container">
    <div class="row">
      <div class="col-sm-12">
        <div class="box padding-top-10 padding-bottom-10">
          <form class="form-inline">
            <div class="form-group">
              <label for="" class="margin-left-10">项目名称</label>
              <input type="search" name="search" id="search" class="form-control margin-left-10">


            </div>

            <div class="form-group">
              <label for="" class="margin-left-10">时间</label>
              <div class="datepk-box c-select vm w240 pop-style vm margin-left-10">
                <input type="text" name="" id="" readonly class="datepk form-control">
                <span class="c-select-btn"></span>
              </div>

              <span class="padding-left-10 padding-right-10 vm">至</span>

              <div class="datepk-box c-select vm w240 pop-style vm">
                <input type="text" name="" id="" readonly class="datepk form-control">
                <span class="c-select-btn"></span>
              </div>

              <label for="search"><span class="glyphicon glyphicon-search margin-10 font-16"></span></label>
            </div>

          </form>
        </div>
      </div>
    </div>
  </div>
</div>
<!-- table -->
<div class="padding-top-10 padding-bottom-10 margin-top-20">
  <div class="container">
    <div class="row">
      <div class="col-sm-12">
        <button type="button" class="btn btn-warning" id="addProject">
          <i class="glyphicon glyphicon-list-alt"></i>
          <span class="margin-left-10">新建项目</span>
        </button>
      </div>

      <div id="table" class="col-sm-12 margin-top-20">
        <table class="table text-center">
          <thead>
            <tr>
              <th>项目名称</th>
              <th>项目类型</th>
              <th>项目时间</th>
              <th>项目阶段</th>
              <th>状态</th>
              <th class="w250">操作</th>
            </tr>
          </thead>
          <tbody id="l2Table">
            <!--<tr>
              <td>某品牌-类型-某日-执行</td>
              <td>高新</td>
              <td>2016年5月5日-2016年5月15日</td>
              <td></td>
              <td>未立项</td>
              <td>
                <button type="button" class="btn btn-success">提交</button>
                <button type="button" class="btn btn-success btn-edit editProject">编辑项目</button>
                <button type="button" class="btn btn-danger">删除</button>
              </td>
            </tr>-->
          </tbody>
        </table>
      </div>

      <div class="col-sm-12 clearfix">
        <!--<div class="pages"></div>-->
        <p class="float-left">总条数：<span id="totalRow">20</span></p>

        <div class="table-pagination float-right line-height-34 margin-left-10 text-center" id="pages"></div>

        <div class="float-right">
          <form class="form-inline">
            <span>显示条数：</span>
            <select name="pageSize" id="pageSize" class="form-control">
              <option value="10">10</option>
              <option value="20">20</option>
              <option value="30">30</option>
            </select>
          </form>
        </div>


      </div>
    </div>
  </div>
</div>

<!-- 立项 -->
<div class="modal fade" id="initProject" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content padding-10 w700">
      <div class="text-right">
        <a class="close-pop" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span></a>
      </div>
      <div>
        <div class="row">
          <div class="col-sm-12"><h3 class="margin-10" id="projectTitle">项目</h3></div>
        </div>
        <form class="form-horizontal">
          <div class="form-group">
            <label for="td1" class="col-sm-3 control-label">项目名称</label>
            <div class="col-sm-8">
              <input type="text" class="form-control" name="td1" id="td1" placeholder="项目名称">
            </div>
          </div>
          <div class="form-group">
            <label for="td2" class="col-sm-3 control-label">项目阶段</label>
            <div class="col-sm-8">
              <select name="td2" id="td2" class="form-control">
                <option value="1">沟通</option>
                <option value="2">执行</option>
                <option value="3">...</option>
              </select>
            </div>
          </div>
          <div class="form-group">
            <label for="td3" class="col-sm-3 control-label">项目类型</label>
            <div class="col-sm-8">
              <select name="td3" id="td3" class="form-control">
                <option value="1">高新</option>
                <option value="2">传统</option>
                <option value="3">...</option>
              </select>
            </div>
          </div>
          <div class="form-group">
            <label for="td4" class="col-sm-3 control-label">品牌</label>
            <div class="col-sm-8">
              <select name="td4" id="td4" class="form-control">
                <option value="1">捷豹路虎</option>
                <option value="2">五菱宝骏</option>
                <option value="3">奔驰</option>
                <option value="4">...</option>
              </select>
            </div>
          </div>
          <div class="form-group">
            <label for="projectStage" class="col-sm-3 control-label">项目时间</label>
            <div class="col-sm-8">
              <div class="datepk-box c-select vm w240 pop-style vm">
                <input type="text" name="td5" id="td5" readonly class="datepk form-control">
                <span class="c-select-btn"></span>
              </div>

              <span class="padding-left-10 padding-right-10 vm">至</span>

              <div class="datepk-box c-select vm w240 pop-style vm">
                <input type="text" name="td6" id="td6" readonly class="datepk form-control">
                <span class="c-select-btn"></span>
              </div>

            </div>
          </div>

          <div class="form-group">
            <div class="col-sm-3 col-sm-offset-3">
              <button type="button" id="save" class="btn btn-danger btn-block">保存</button>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>

<!-- 项目人员配置 -->
<div class="modal fade" id="projectStaff" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content padding-10 w700">
      <div class="text-right">
        <a class="close-pop" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span></a>
      </div>
      <div>
        <div class="row">
          <div class="col-sm-12"><h3 class="margin-10">项目人员配置</h3></div>
        </div>
        <form class="form-horizontal">
          <div class="form-group">
            <label for="projectStage" class="col-sm-3 control-label">项目经理</label>
            <div class="col-sm-8">
              <select name="projectStage" id="projectStage" class="form-control">
                <option value="张三">张三</option>
                <option value="李四">李四</option>
                <option value="其他">...</option>
              </select>
            </div>
          </div>
          <div class="form-group">
            <label for="projectStage" class="col-sm-3 control-label">项目运营</label>
            <div class="col-sm-8">
              <div class="multi" id="multi1">
                <div class="multi-tag form-control"></div>
                <ul class="none">
                  <li>张三</li>
                  <li>李四</li>
                  <li>..</li>
                </ul>
              </div>
            </div>
          </div>
          <div class="form-group">
            <label for="projectStage" class="col-sm-3 control-label">老师</label>
            <div class="col-sm-8">
              <div class="multi" id="multi2">
                <div class="multi-tag form-control"></div>
                <ul class="none">
                  <li>王五</li>
                  <li>赵六</li>
                  <li>..</li>
                </ul>
              </div>
            </div>
          </div>

          <div class="form-group">
            <div class="col-sm-3 col-sm-offset-3">
              <button type="button" id="" class="btn btn-danger btn-block">保存</button>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>

<!-- 单日票据审核 -->
<div class="modal fade" id="detailList" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content padding-10 w700">
      <div class="text-right">
        <a class="close-pop" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span></a>
      </div>
      <div>
        <div class="row">
          <div class="col-sm-12"><h3 class="margin-10">某品牌-类型-某日-执行</h3></div>
        </div>
        <form class="form-horizontal">
          <div class="form-group">
            <label for="projectStage" class="col-sm-3 control-label">报销日期</label>
            <div class="col-sm-8">
              <span class="form-control">2016年5月5日</span>
            </div>
          </div>

          <div class="form-group">
            <label for="projectStage" class="col-sm-3 control-label">报销人</label>
            <div class="col-sm-8">
              <span class="form-control">讲师A</span>
            </div>
          </div>

          <div class="form-group">
            <label for="projectStage" class="col-sm-3 control-label">城市间交通费用</label>
            <div class="col-sm-8">
              <span class="form-control">总计：***元 <span class="float-right">费用说明</span></span>
            </div>
          </div>

          <div class="form-group">
            <label for="projectStage" class="col-sm-3 control-label">市内交通费用</label>
            <div class="col-sm-8">
              <span class="form-control">总计：***元 <span class="float-right">费用说明</span></span>
            </div>
          </div>

          <div class="form-group">
            <label for="projectStage" class="col-sm-3 control-label">住宿费用</label>
            <div class="col-sm-8">
              <span class="form-control">总计：***元 <span class="float-right">费用说明</span></span>
            </div>
          </div>

          <div class="form-group">
            <div class="col-sm-8 col-sm-offset-3">
              <img src="#" alt="" class="max-width-100">
              <p><a href="#">下载图片</a></p>
            </div>
          </div>

          <div class="form-group">
            <ul class="step-list">
              <li class="row">
                <div class="col-sm-6">
                  <p>提交申请</p>
                  <p>16:40:16</p>
                </div>
                <div class="col-sm-6"><p>2016年3月26日</p></div>
              </li>
              <li class="row">
                <div class="col-sm-6">项目运营已确认发票</div>
                <div class="col-sm-6">2016年3月27日16:40:16</div>
              </li>
            </ul>
          </div>

          <div class="form-group">
            <div class="col-sm-3 col-sm-offset-3">
              <button type="button" id="btn-save" class="btn btn-success btn-block">通过</button>
            </div>
            <div class="col-sm-3">
              <button type="button" id="" class="btn btn-danger btn-block">驳回</button>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>

<!-- 项目成本提交 -->
<div class="modal fade" id="costPost" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content padding-10 w700">
      <div class="text-right">
        <a class="close-pop" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span></a>
      </div>
      <div>
        <form class="form-horizontal">
          <div>
            <div class="form-group">
              <div class="col-sm-3">
                <select name="" id="" class="form-control">
                  <option value="">1</option>
                  <option value="">2</option>
                  <option value="">3</option>
                </select>
              </div>
              <div class="col-sm-8">
                <input type="text" name="" id="" class="form-control text-right" placeholder="元">
              </div>
            </div>

            <div class="form-group">
              <label for="" class="col-sm-3 control-label">使用日期</label>
              <div class="col-sm-8">
                <input type="text" class="form-control date" name="" id="">
              </div>
            </div>

            <div class="form-group">
              <label for="" class="col-sm-3 control-label">备注</label>
              <div class="col-sm-8">
                <input type="text" class="form-control" name="" id="" placeholder="备注">
              </div>
            </div>
          </div>

          <div class="form-group">
            <div class="col-sm-3 col-sm-offset-3">
              <button type="button" class="btn btn-success"><span class="glyphicon glyphicon-plus-sign"></span></button>
            </div>
          </div>

          <div class="form-group">
            <div class="col-sm-3 col-sm-offset-3">
              <button type="button" id="" class="btn btn-success btn-block">通过</button>
            </div>
            <div class="col-sm-3">
              <button type="button" id="" class="btn btn-danger btn-block">驳回</button>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>


<script id="PROJECT_STAGE" type="text/html">
  {{each PROJECT_STAGE as value i}}
  <option value="{{value.ID}}">{{value.Text}}</option>
  {{/each}}
</script>

<script id="PROJECT_TYPE" type="text/html">
  {{each PROJECT_TYPE as value i}}
  <option value="{{value.ID}}">{{value.Text}}</option>
  {{/each}}
</script>

<script id="PROJECT_BRAND" type="text/html">
  {{each PROJECT_BRAND as value i}}
  <option value="{{value.ID}}">{{value.Text}}</option>
  {{/each}}
</script>

<script id="l2List" type="text/html">
  {{each $data}}
  <tr>
    <td>{{$value.Name}}</td>
    <td>{{$value.ProjectType}}</td>
    <td>{{$value.StartDate}} - {{$value.EndDate}}</td>
    <td>{{$value.State}}</td>
    <td></td>
    <td>
      {{if $value.State === '提交'}}
      <button type="button" class="btn btn-success submitProject" disabled="disabled">已提交</button>
      {{else}}
      <button type="button" class="btn btn-success submitProject">提交</button>
      {{/if}}

      <button type="button" class="btn btn-success btn-edit editProject">编辑项目</button>
      <button type="button" class="btn btn-danger delProject">删除</button>
    </td>
  </tr>
  {{/each}}
</script>


@section myscript{
  <script src="~/Content/js/formCheck.js"></script>
  <script src="~/Content/js/bind2.js"></script>
}